package com.my.code.filesort;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;

/**
 * -
 *
 * @author zzl
 * @date 2020/10/13
 */
public class TestFileSort {
    public static void main(String[] args) throws IOException {
        String path = "D:/data/tmp/bigdata.txt";

        int len = 100_0000;

        File file = new File(path);
        file.createNewFile();
        FileWriter writer = new FileWriter(file);
        Random r = new Random();
        for (int i = 0; i < len; i++) {
            writer.append(String.valueOf(r.nextInt())).append("\n");
        }
        writer.close();
    }
}
